chore: fix sinon-chai relative path rewrite as it is breaking type checking in the cypress cli externally #31733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Additional details
The
sinon-chai
updates in #31716 introduced a failure in https://app.circleci.com/pipelines/github/cypress-io/cypress/70732/workflows/85cb0258-851d-40aa-ac39-5e863f6d7caf/jobs/2904496. This had to do with us rewriting the type imports to be relative importsin @types/sinon-chai
and a few other type packages in the post install. In@types/sinon-chai
3.2.9
, the imports used single quotes, but changed to double quotes in3.2.10
. This broke the rewrite and it failed silently only until the type checking was performed against the binary in CI.<=3.2.9
>=3.2.10
In the future, this likely should be a patch-package instead of a post install script because it will fail loudly and not silently like we saw here.
Steps to test
Failing job in todomvc should now pass
How has the user experience changed?
npx tsc
should not fail externally in the binaryPR Tasks
cypress-documentation
?type definitions
?